package project.taobao.microsoft.transaction.provider.one.service.impl;

import org.springframework.stereotype.Service;
import project.taobao.microsoft.transaction.api.pojo.Order;
import project.taobao.microsoft.transaction.api.pojo.OrderExample;
import project.taobao.microsoft.transaction.provider.one.dao.OrderMapper;
import project.taobao.microsoft.transaction.provider.one.service.OrderService;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author yhq
 * @date 2020/8/26 10:32
 */
@Service
public class OrderServiceImpl implements OrderService {
    @Resource
    private OrderMapper orderMapper;

    // methods
    @Override
    public long countByExample(OrderExample example) {
        return this.orderMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(OrderExample example) {
        return this.orderMapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return this.orderMapper.deleteByPrimaryKey(id);
    }

    @Override
    public synchronized int insert(Order record) {
        return this.orderMapper.insert(record);
    }

    @Override
    public Order insertWithReturn(Order record) {
        return this.orderMapper.insertWithReturn(record);
    }

    @Override
    public int insertSelective(Order record) {
        return this.orderMapper.insertSelective(record);
    }

    @Override
    public List<Order> selectByExample(OrderExample example) {
        return this.orderMapper.selectByExample(example);
    }

    @Override
    public Order selectByPrimaryKey(Long id) {
        return this.orderMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByExampleSelective(Order record, OrderExample example) {
        return this.orderMapper.updateByExampleSelective(record, example);
    }

    @Override
    public int updateByExample(Order record, OrderExample example) {
        return this.orderMapper.updateByExample(record,example);
    }

    @Override
    public int updateByPrimaryKeySelective(Order record) {
        return this.orderMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Order record) {
        return this.orderMapper.updateByPrimaryKey(record);
    }
    // getters, setters

    // constructors
}
